#!/bin/bash


BIN_PATH=bin
MACHINE_PATH=machines
BIN=$BIN_PATH/ctl
OUTPUT=output
OUTPUT_FILE=$OUTPUT/result.txt

MACHINES=`ls machines | grep .dot`
EXPRESSIONS=( "r" "r->p" "EX(r)" "r^EX(r)" "q^EX(q)" "AX(r)" "AX(EX(r))" 
				"p->EX(EX(EX(p)))" "EF(r^p)" "AF(r^p)" "AF(p)"
				"EG(q)" "EG(p^r)" "AG(q)" "AG(p^r)" "AG(AX(p))" "E[pU(q^r)]" "EG(p^q)"
				"A[rUAG(p^q)]" )

echo "" > $OUTPUT_FILE	
for expression in ${EXPRESSIONS[@]};
do
		validState=`./$BIN -e $expression -m $MACHINE_PATH/$MACHINES | tail -1`
		echo $expression: $validState >> $OUTPUT_FILE
done

echo "" >> $OUTPUT_FILE
